#ifndef ID3_H
#define ID3_H


/*PROGRAM SPECIFIC DEFINES*/
#define		HEADER_LENGTH 	10	//id3 header length

/*ID3 HEADER BUFFER DEFINES*/
#define IDX_ID3_3		0x00
#define IDX_ID3_2		0x01
#define	IDX_ID3_1		0x02

//bytes 7-10
#define IDX_SIZE_MMSB		0x06 //msb of size
#define IDX_SIZE_MSB		0x07
#define IDX_SIZE_LSB		0x08
#define IDX_SIZE_LLSB		0x09//lsb of size

/*enums*/
enum
{
	MP3_FILE_TAG_FOUND,	
	MP3_FILE_TAG_NOT_FOUND
};

/*structures*/
typedef struct
{
	int infoTagSize;
	char infoID3Valid;
	long infoFileSize;
	char infoFrame[5];
	char* strFileName;
	char* id3Title;
} mp3InfoStruct;

typedef struct 
{
	char id3Album[10];
} mp3id3InfoStruct;

/*function prototypes*/
void id3getTagSize(const char*, mp3InfoStruct*);
int synchsafe(int);
char id3ValidCheck(const char*);
void id3GetFileSize(mp3InfoStruct *, const char *);
void id3GetFrame(const char*, mp3InfoStruct*);
char* id3ParseFrame(const char*, int);
int id3GetTagWOImage(const char*, int);
#endif